{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 近似积分\n",
    "该 notebook 将要探索的是如何将函数切成矩形，从而近似其积分。\n",
    "\n",
    "之后（在下一个notebook中），你将需要实际操作，把你之前看到的电梯加速度计数据进行集成。\n",
    "\n",
    "## 第1部分 - 可视化矩形"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from matplotlib import pyplot as plt\n",
    "import numpy as np\n",
    "import warnings\n",
    "warnings.filterwarnings('ignore')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "def show_approximate_integral(f, t_min, t_max, N):\n",
    "    t = np.linspace(t_min, t_max)\n",
    "    plt.plot(t, f(t))\n",
    "    \n",
    "    delta_t = (t_max - t_min) / N\n",
    "    \n",
    "    print(\"Approximating integral for delta_t =\",delta_t, \"seconds\")\n",
    "    box_t = np.linspace(t_min, t_max, N, endpoint=False)\n",
    "    box_f_of_t = f(box_t)\n",
    "    plt.bar(box_t, box_f_of_t,\n",
    "            width=delta_t,\n",
    "            alpha=0.5,\n",
    "            facecolor=\"orange\",\n",
    "            align=\"edge\",\n",
    "            edgecolor=\"gray\")\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "def f1(t):\n",
    "    return -1.3 * t**3 + 5.3 * t ** 2 + 0.3 * t + 1 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Approximating integral for delta_t = 2.0 seconds\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uI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1GOecuL1eNJcDr0ezwYuMcYcoPmw7AXGmFeOWaZdt5e3FXprphN4D7i25fMrgM9syxkGJ3Mdc5z1EpqPgzrtPeCalpEb44Eya22O06GMMYn/Om5ojBlH889hkQfWa4CFwE5r7eMnWMzj26w1uZzYZsaYeGNM55bPOwAXAruOWczjr8fW5HLi9WitfcBam2Kt7U1zR3xmrZ1zzGLtur1culLU3ewJphMwxjwCbLDWvkfzD/7Lxpi9NP9mm+klue4wxlwCNLTkmtveuYwxS2ke/dDVGJMFPEzzCSKstc/RfBXvNGAvUA1c196ZWpnrCuBnxpgG4Agw0wO/lKF5D+pqYFvL8VeAB4GeR2VzYpu1JpcT2ywJWGSab2YTBLxurX3f6ddjK3N5/PV4Ip7cXrpSVETET3jbIRcREWkjFbqIiJ9QoYuI+AkVuoiIn1Chi4j4CRW6iIifUKGLiPgJFbqIiJ/4/zj4bUAG8WvAAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# TODO - increase N from 2 to 4 to 8 etc... and run\n",
    "#        this cell each time. Notice how the bars \n",
    "#        get closer and closer to approximating \n",
    "#        the true area under the curve.\n",
    "\n",
    "N = 2\n",
    "show_approximate_integral(f1,0,4,N)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Approximating integral for delta_t = 0.08 seconds\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xd8VfX9x/HXN3uShCSQTQiErawIuEFkuGuru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+7kMmKfKaXClVLB7Z/7ApcDhzoNs/nrsTu5jHg9aq2f1lrHaK3jaasRX2utb+80zKr7q09XilqaPs1yAkqp3wHJWus1tP3iv6uUyqTtL9vNdpLrEaXUtUBre6651s6llFpOW/dDmFIqD3iWthNEaK1fp+0q3iuBTKAe+Km1M3Uz1w3A/UqpVqABuNkGf5Sh7QjqDmBf+/wrwDNA3EnZjNhn3cllxD6LBBartpvZuAGrtNZrjX49djOXzV+Pp2PL/SVXigohhJOwtykXIYQQvSQFXQghnIQUdCGEcBJS0IUQwklIQRdCCCchBV0IIZyEFHQhhHASUtCFEMJJ/D8w4wvKOkf1tgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# When N is big, the approximation is PRETTY\n",
    "# close to reality.\n",
    "\n",
    "N = 50\n",
    "show_approximate_integral(f1, 0, 4, N)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 第2部分 - 近似积分\n",
    "\n",
    "在本节中，你将要解决一些集成类的“作业问题”。\n",
    "\n",
    "这些都是你在典型的微积分教科书中会看到的问题（并且**恰好**可以用巧妙的集成技术来解决）。\n",
    "\n",
    "首先，让我们来看看你将用来执行这些近似值的函数！"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "def integral(f, t1, t2, dt=0.1):\n",
    "    # area begins at 0.0 \n",
    "    area = 0.0\n",
    "    \n",
    "    # t starts at the lower bound of integration\n",
    "    t = t1\n",
    "    \n",
    "    # integration continues until we reach upper bound\n",
    "    while t < t2:\n",
    "        \n",
    "        # calculate the TINY bit of area associated with\n",
    "        # this particular rectangle and add to total\n",
    "        dA = f(t) * dt\n",
    "        area += dA\n",
    "        t += dt\n",
    "    return area"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "我会帮你解决第一个例子。\n",
    "#### 作业1 - 例子\n",
    "\n",
    "计算以下积分：\n",
    "\n",
    "$$\\int_{2}^{4}t^2dt$$\n",
    "\n",
    "**正确答案: 18.66**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# solution step 1: define the function to be integrated\n",
    "\n",
    "def f1(t):\n",
    "    return t**2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "18.07000000000001"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# solution step 2: try to solve it...\n",
    "integral(f1, 2, 4)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "这个值很接近了，但我想让准确性更高。让我们从默认值0.1中减少dt ..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "18.766699999999705"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "integral(f1,2,4,0.01)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "18.67666699999851"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "integral(f1,2,4,0.001)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "18.666066670028115"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "integral(f1,2,4, 0.0001)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "太好了！ 在将来的计算中，我们可能应该使用dt的这个值。 在进行下一步之前，让我们看看这个积分。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Approximating integral for delta_t = 0.1 seconds\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xl8VfWd//HXJwuEIHvYIQRkX2QxWEVRRC2ouNa1WpfqMJ2ZOk4Xt1/Hpf11qm2tS6u2xUrFuovWDRdACZvIvu9JCNkgC4EESAJJ7nf+uJfpNWVJ7prcvJ+PRx6596wfDue+c+73fM855pxDRESav7hoFyAiIqGhQBcRiREKdBGRGKFAFxGJEQp0EZEYoUAXEYkRCnQRkRihQBcRiREKdBGRGJEQyZWlpKS4tLS0SK5SRKTZW716dalzruuppotooKelpbFq1apIrlJEpNkzs90NmU5NLiIiMUKBLiISIxToIiIxQoEuIhIjFOgiIjHilIFuZjPNrNjMNtUbfo+ZbTezzWb2m/CVKCIiDdGQI/SXgan+A8zsQuAq4Azn3AjgydCXJiIijXHKQHfOLQLK6g3+N+AJ59wR3zTFYahNRCQmFByoish6Am1DHwxMNLPlZrbQzMaHsigRkVhQU+fhmfk7uOA3C1iwLfzHvYFeKZoAdALOBsYDb5vZAHecJ06b2XRgOkBqamqgdYqINCvb9x7kJ++sY1NBBVeP6cXY1I5hX2eggZ4PvOcL8BVm5gFSgJL6EzrnZgAzANLT0/8p8EVEYkmdxzFjUTZPz9tBu6QE/nTrmUwd2SMi6w400N8HJgMZZjYYaAWUhqwqEZFmKLvkED95Zz1rcw9w6cge/PLqkXQ5rXXE1n/KQDezN4BJQIqZ5QOPAjOBmb6ujEeB24/X3CIi0hJ4PI6/fpXDbz/fRuuEeJ69aQxXju6FmUW0jlMGunPu5hOMujXEtYiINDs5pYe5f/YGVuSU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wGbgZxGu64e+9a7HezJtgt/8l+HtgZIV6bp8092B90SQ/7zh3F5nAGt9dW0CHvEN/wXeo16AJOAd3z60AhjgN//PfNtqO3BphOuaDxT5bc8PfcMn+D4H632/74pwXY/77V8LgKF+84fr83jKunzvHwOeqDdv2LZXvfVMwhfo0dq/dKWoiEiMaBJt6CIiEjwFuohIjFCgi4jECAW6iEiMUKCLiMQIBbqISIxQoIuIxAgFuohIjPhfLiOOArHK+S4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "show_approximate_integral(f1,2,4,20)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 作业2\n",
    "\n",
    "计算以下积分：\n",
    "\n",
    "$$\\int_{-2}^2 3t^3 - 4t dt$$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Your code here\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 作业3（这个可能会比较有难度）\n",
    "计算以下积分：\n",
    "\n",
    "$$\\int_3^{7} \\frac{1}{\\sqrt{2\\pi\\times0.2}} e^{-\\frac{(t-5)^2}{2 \\times 0.2}}dt$$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Your code here\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "-----\n",
    "解决方案"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-6.485876072326313e-12"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Solution 2\n",
    "def f2(t):\n",
    "    return 3 * t**3 - 4*t\n",
    "\n",
    "integral(f2, -2, 2, 0.0001)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "这个数字以“e-12”结尾，意思是 $\\times 10 ^ {-12}$\n",
    "\n",
    "这意味着这个积分是0.00000000000648（基本上为零）。这个结果应该不会让人感到意外，因为我们在一个奇函数中对称地进行了集成（t上的所有指数都是奇数）。\n",
    "\n",
    "This means that for any positive contribution on one side of zero, there's a negative contribution to the total area on the other side of zero.也就是说，对于零的任何一方的积极贡献，对零的另一方的总面积都有负面贡献。（译者：不太理解原文）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Approximating integral for delta_t = 0.1 seconds\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xl8XXWd//HXJ3uavUmapk33vbRQaCibQIEiiCKioMgM4IIdRhllFkcUxvE3MyrqKAOOjlRBESgqYAERLGtbWqDQltK9TUjSNk3bbM3ebPd+f3/kgqHcNCnJuecm9/18PO4jd/ne8/3k9Obdc7/nnO8x5xwiIjLyxfldgIiIRIYCX0QkRijwRURihAJfRCRGKPBFRGKEAl9EJEYo8EVEYoQCX0QkRijwRURiRILfBfSWl5fnJk+e7HcZIiLDysaNG2udc/n9tYuqwJ88eTIbNmzwuwwRkWHFzPYOpJ2GdEREYoQCX0QkRijwRURihAJfRCRGKPBFRGKEAl9EJEYo8EVEYoQCX0TEZ79eV85zOw573o8CX0TER83tXfxo5W6e23HI874U+CIiPnp8cxVtnQH+5oxJnvelwBcR8YlzjuXr93HSuExOLsryvL8hCXwzu8/Mqs1sW6/nvmNmB8xsc+h22VD0JSIyUry5v4GdB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7A1ghplNMbMkena0eXKEx4kwszQzy3jnPj07oMMeURBhfqyvJ4EbQvdvAN73TcTMcswsOXQ/DzgH2DHEdQzkd+9d61XAi31saES0rmPGeD9Oz9hwNHgSuD505MmZQOM7w3d+MrOx7+x7MbNF9GRh3fHfNST9GnAvsNM595M+mnm3ziK9l3oob0ApPWNdm0O3d46eGAc83avdZfTsDX+bnqENr+u6kp7/pTuAw8DKY+ui54iLt0K37dFSl0/rKxd4ASgJ/Rwder4Y+FXo/tnA1tD62gp80aNa3ve7A/9Bz0YFQArwSOiz9zow1ev1M8C6vh/6HL0FvATMjlBdDwMHga7QZ+uLwE3ATaHXDfhZqO6tHOeotQjXdXOv9fUacHaE6voQPcMzW3rl1mWRWmc601ZEJEYM6yEdEREZOAW+iEiMUOCLiMQIBb6ISIxQ4IuIxAgFvohIjFDgi4jECAW+iEiM+P8pcRPjwdK5hgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "show_approximate_integral(f2, -2,2,40)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.9999922557157402"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Solution 3\n",
    "\n",
    "from math import sqrt, pi\n",
    "\n",
    "def f3(t):\n",
    "    coeff    = 1.0 / sqrt(2 * pi * 0.2)\n",
    "    exponent = -(t-5)**2 / (2*0.2)\n",
    "    return coeff * np.exp(exponent)\n",
    "\n",
    "integral(f3, 3, 7, 0.001)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "几乎接近1！ 这是因为我刚刚集成的函数是高斯概率分布。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Approximating integ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3yUAQ91k4j5YpAn7pPctsA7YYY7aL9dMe+FPX50VkA+D21vXRENQ1oTDYX/7UZcX+mgb8xvuZjwOeM8b8QUQ+BWCM+RmjV2WvB2qAPuBjYVLXB4BPi4gb6Ac2hWgup88B/+XtZqgDPhYG+8ufuqzaX4hICqMLHX1yzGMh2Wd6hapSSkWhsO2WUUopdfU03JVSKgppuCulVBTScFdKqSik4a6UUlFIw10ppaKQhrtSSkUhDXellIpC/w9tfdnhxH5I0QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "show_approximate_integral(f3, 3, 7, 50)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
